<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>深航服务信息系统</title> 
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />
<script src="<c:url value="/scripts/date.js"/>" language="javascript"></script>
<script src="<c:url value="/scripts/common.js"/>" language="javascript"></script>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type='text/javascript' src='dwr/interface/FlightInfoDwr.js'></script>
<script type='text/javascript' src='dwr/interface/VipServiceInfo.js'></script>
</head>
<body leftmargin="0" topmargin="0">
<html:form action="vipServiceSheet" method="post" styleId="vipServiceSheetForm">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="44" class="home-content-title">
    <img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle">
     &nbsp;高端旅客服务申请单</td>
  </tr>
  <tr>
    <td height="40" class="home-search-space">&nbsp;<fmt:message key="common.warning"/></td>
  </tr>
  <logic:messagesPresent>
		<tr id="messagesPresentTrId" style="display:;">
			<td valign="top" class="black12" height="20">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
					<tr>
						<td class="arror_bg">
							<span class="arror_title">
						     您的操作存在如下错误：<br></span>
						     <html:errors/>
					    </td>
				    </tr>
			    </table>
			</td>
		</tr>
  </logic:messagesPresent>
  <tr id="messageShowTrId" style="display:none;">
	<td valign="top" class="black12">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
	<td class="arror_bg">
	<span class="arror_title"> 
     您的操作存在如下错误：<br/>
     </span>
     <span id="warnSpanId" style="display:none;">
      <font style="color: blue"><li>没有记录，请输入正确的身份证号！或请手动输入资料</font>
     </span>
     <span id="warnSpanFlightId" style="display:none;">
      <li>没有记录，请输入正确的航班号和日期
     </span>
    </td>
    </tr>
    </table>
	</td>
	</tr>
	<tr id="messageTrId" style="display:none;">
	<td valign="top" class="black12">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
	<td class="arror_bg_s">
	<span class="arror_title_s"> 
        保存信息成功!<br/>
     </span>
    </td>
    </tr>
    </table>
	</td>
	</tr>
  <tr>
    <td valign="top"> 
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="home-table-topline"> </td>
        </tr>
        <tr> 
          <td class="home-table-leftline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-tool-content">
             <c:choose>
             <c:when test="${vipServiceSheetForm.approvedMan==null||vipServiceSheetForm.approvedMan==''}">
			 <html:submit styleClass="home-inputBtn" property="method.save">
            			<fmt:message key="button.save"/>
			</html:submit>
			</c:when>
			<c:otherwise>
			 <html:submit styleClass="home-inputBtn" property="method.save"  disabled="true">
            			<fmt:message key="button.save"/>
			</html:submit>
			</c:otherwise>
			</c:choose>
			<html:button styleClass="home-inputBtn" property="method.reset" onclick="javascript:formRset();">
            			<fmt:message key="button.reset"/>
			</html:button>
        	<html:button styleClass="home-inputBtn" property="method.cancel" onclick="javascript:location.href='./vipServiceSheet.html'">
            			<fmt:message key="button.cancel"/>
			</html:button>
			<!-- <html:button styleClass="home-inputBtn" property="method.send">
            			发送短信
			</html:button> -->
		</td>
              </tr>
              <tr>
                <td align="center" valign="top">&nbsp;</td>
              </tr>
              <tr> 
                <td valign="top" class="home-edittable-space"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td><table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">

			<html:hidden property="id"/>
			<html:hidden property="procInstId"/>
			<html:hidden property="approvedMan"/>
			<input type="hidden" name="vipInfoId" id="vipInfoId" />
			<input type="hidden" name="flightInfoId" id="flightInfoId" />
<!--  
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="vipServiceSheetForm.passengerId"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="passengerId" styleId="passengerId" styleClass="home-table-inputbox" /> 
			<html:errors property="passengerId"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="vipServiceSheetForm.vipInfoId"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="vipInfoId" styleId="vipInfoId" styleClass="home-table-inputbox" /> 
			<html:errors property="vipInfoId"/>
			</td>
			</tr>-->

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			&nbsp;<font color="red">*</font>航班号：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="flightNum" onblur="javascript:getFlightInfo('');" maxlength="7" onkeyup="javascript:isNotChinese(this);"
			styleId="flightNum" styleClass="home-table-inputbox" style="border-color: #FF0033;"/> 
			
			</td>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;<font color="red">*</font>日期：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
		    <input type="text" name="flightDate" value="<c:out value='${vipServiceSheetForm.flightDate}'/>" id="flightDate" class="home-table-inputbox" onpropertychange="javascript:getFlightInfo('');"
			 style="border-color: #FF0033;" maxlength="10" onkeyup="javascript:isNotChinese(this);" onkeypress="return intBoxDate();"/>
			<img src="images/date.gif" border="0" onclick="fPopCalendar(flightDate,flightDate);">
			</td>
			</tr>
			
			<tr onclick="javascript:getFlightInfo('c');">
			<td class="home-subtable-view-tdstyle-right"> 
			&nbsp;<font color="red">*</font>出发站：
			</td>
			<td  class="home-subtable-view-tdstyle-left" id="fromPortTd">
			<html:hidden property="fromPort" styleId="fromPort"/>
			<html:text property="fromPortName" styleId="fromPortName" readonly="true"
			style="border:0" styleClass="home-subtable-view-tdstyle-left"/> 
			</td>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;<font color="red">*</font>终点站：
			</td>
			<td  class="home-subtable-view-tdstyle-left" id="toPortTd">
			<html:hidden property="toPort" styleId="toPort"/>
			<html:text property="toPortName" styleId="toPortName" readonly="true"
			style="border:0" styleClass="home-subtable-view-tdstyle-left"/> 
			</td>
			</tr>


			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;<font color="red">*</font>身份证号：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="idCard" styleId="idCard" styleClass="home-table-inputbox" size="20"
			onblur="javascript:getVipServiceInfo();" onkeyup="javascript:isNotChinese(this);" onkeypress="return intBox(18);" style="border-color: #FF0033;"/> 
			
			</td>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;<font color="red">*</font>姓名：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="name" styleId="name" styleClass="home-table-inputbox"/>
			</td> 
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;<font color="red">*</font>性别：
			</td>
			<td class="home-subtable-view-tdstyle-left" id="gender_f">
			<html:select name="vipServiceSheetForm" property="gender" size="1" styleId="gender">
			  <html:option value="">&nbsp;</html:option>
			  <html:option value="1">男</html:option>
			  <html:option value="0">女</html:option>
			</html:select> 
			</td>
			<td class="home-subtable-view-tdstyle-left" id="gender_s" style="display: none;">
			<input type="hidden" name="gender" id="genderIn"><span id="genderSpan">男</span>
			</td>
			
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;职务：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="duty" styleId="duty" styleClass="home-table-inputbox" /> 
			
			</td>
			</tr>
			
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;<font color="red">*</font>旅客类型：
			</td>
			<td  class="home-subtable-view-tdstyle-left" id="vipTypeId_f">
			<html:select name="vipServiceSheetForm" property="vipTypeId" size="1" styleId="vipTypeId" onchange="javascipt:getVipTypeInfo(this.value);">
			  <html:option  value="0">&nbsp;</html:option> 
			  <html:options collection="vipTypeInfo" property="id" labelProperty="name"/> 
			</html:select>
			</td>
			<td  class="home-subtable-view-tdstyle-left" id="vipTypeId_s" style="display: none;">
			<html:hidden property="vipTypeId" styleId="vipTypeId"/>
			<input type="text" name="vipTypeIdTxt" id="vipTypeIdTxt" style="border:0" 
			 class="home-subtable-view-tdstyle-left" readonly="true"/>
			</td>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;卡号：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="cardNum" styleId="cardNum" onkeyup="this.value=this.value.replace(/[\u4e00-\u9fa5]/g,'')" onkeypress="return intBox();" styleClass="home-table-inputbox" />
			
			</td>
			</tr>
			
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;联系电话：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="mobile" styleId="mobile" onkeyup="this.value=this.value.replace(/[\u4e00-\u9fa5]/g,'')" onkeypress="return intBox(11);" styleClass="home-table-inputbox"/>
			
			</td>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;订座编码：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="bookNumb" styleId="bookNumb" styleClass="home-table-inputbox" /> 
			
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;舱位等级：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:select name="vipServiceSheetForm" property="order" size="1" styleId="order">
			<html:option value="">&nbsp;</html:option>
			  <html:option value="F">头等舱</html:option>
			  <html:option value="C">公务舱</html:option>
			  <html:option value="Y">经济舱</html:option>
			</html:select> 
			</td>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;随行人员：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="retinueName" styleId="retinueName" styleClass="home-table-inputbox" /> 
			
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;随行人员舱位等级：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:select name="vipServiceSheetForm" property="retinueOrder" size="1" styleId="retinueOrder">
			  <html:option value="">&nbsp;</html:option>
			  <html:option value="F">头等舱</html:option>
			  <html:option value="C">公务舱</html:option>
			  <html:option value="Y">经济舱</html:option>
			</html:select> 
			</td>
			<td class="home-subtable-view-tdstyle-right">
			 &nbsp;随行人数：
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="retinueNum" onkeypress="return intBox(3);" styleId="retinueNum" styleClass="home-table-inputbox"/> 
			
			</td>
			</tr>
			
			<tr>
			<td class="home-subtable-view-tdstyle-right">
			 &nbsp;<font color="red">*</font>服务标准：
			</td>
			<td class="home-subtable-view-tdstyle-left" colspan="3">
			 <table>
                  <tr> 
                    <tr>
					<td  class="home-subtable-view-tdstyle-left">
					<html:checkbox property="bookTicket" styleId="bookTicket" value="1"/> 
					 1 预定机票
					</td>
					
					<td  class="home-subtable-view-tdstyle-left">
					<html:checkbox property="provideFood" styleId="provideFood" value="1"/> 
					 2 准备餐食
					</td>
					
					<td  class="home-subtable-view-tdstyle-left">
					<html:checkbox property="sentCar" styleId="sentCar" value="1"/> 
					 3 安排车辆送机
					</td>
                  </tr>
                  <tr> 
                    <td class="home-subtable-view-tdstyle-left">
                   <html:checkbox property="boardCheck" styleId="boardCheck" value="1"/> 
                      4 代办登机牌</td>
                    <td class="home-subtable-view-tdstyle-left">
                   <html:checkbox property="receivedMan" styleId="receivedMan" value="1"/> 
                      5 指派迎接人员</td>
                    <td class="home-subtable-view-tdstyle-left">
                    <html:checkbox property="visitantRoom" styleId="visitantRoom" value="1"/> 
                      6 贵宾室接待</td>
                  </tr>
                  <tr> 
                    <td class="home-subtable-view-tdstyle-left">
                    <html:checkbox property="cabinService" styleId="cabinService" value="1"/> 
                      7 机上客舱服务</td>
                    <td class="home-subtable-view-tdstyle-left">
                    <html:checkbox property="receivedCar" styleId="receivedCar" value="1"/> 
                      8 安排车辆接机</td>
                    <td class="home-subtable-view-tdstyle-left">
                    <html:checkbox property="other" styleId="other" value="1"/> 
                      9 礼仪物品准备</td>
                  </tr>
            </table>
			</td>
			</tr>
<!-- 
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="vipServiceSheetForm.receivedOffice"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="receivedOffice" styleId="receivedOffice" styleClass="home-table-inputbox" /> 
			<html:errors property="receivedOffice"/>
			</td>
			</tr> -->
			
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;服务提示：
			</td>
			<td  class="home-subtable-view-tdstyle-left" colspan="3">
			<html:textarea property="serviceHint" styleId="serviceHint" styleClass="home-table-inputbox" cols="74" rows="2"/> 
			
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;餐食要求：
			</td>
			<td  class="home-subtable-view-tdstyle-left" colspan="3">
			<html:textarea property="foodDesire" styleId="foodDesire" styleClass="home-table-inputbox" cols="74" rows="2"/> 
			
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			 &nbsp;服务要求：
			</td>
			<td  class="home-subtable-view-tdstyle-left" colspan="3">
			<html:textarea property="serviceDesire" styleId="serviceDesire" styleClass="home-table-inputbox" cols="74" rows="2"/> 
			
			</td>
			</tr>
<!-- 
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="vipServiceSheetForm.operator"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="operator" styleId="operator" styleClass="home-table-inputbox" /> 
			<html:errors property="operator"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="vipServiceSheetForm.operateDate"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="operateDate" styleId="operateDate" styleClass="home-table-inputbox" /> 
			<html:errors property="operateDate"/>
			</td>
			</tr> -->
                        </table></td>
                    </tr>
                  </table> 
                </td>
              </tr>
            </table>
		  </td>
        </tr>
        <tr> 
          <td height="12">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
	  </td>
  </tr>
  <tr>
    <td height="10">&nbsp;</td>
  </tr>
</table>
</html:form>
</body>
</html>
<script type="text/javascript">
//保存信息处理
if("1"=='<c:out value="${flag}"/>'){
	//alert("保存信息成功!");
	var messageTrIdTd=document.getElementById("messageTrId");
	messageTrIdTd.style.display="";
	//window.location=window.location;  
}else if("-1"=='<c:out value="${flag}"/>'){
	alert("保存信息失败!");
	 
}else if("2" ==  '<c:out value="${flag}"/>'){
	window.location=window.location;  
}
</script>
<script type="text/javascript">
function formRset(){
    vipServiceSheetForm.reset();
    var nameTxt=document.getElementById("name");
	var idCardTxt=document.getElementById("idCard");
	var gender_f_Sel=document.getElementById("gender_f");
	var gender_s_Sel=document.getElementById("gender_s");
	var vipTypeId_f_Sel=document.getElementById("vipTypeId_f");
	var vipTypeId_s_Sel=document.getElementById("vipTypeId_s");
	var dutyTxt=document.getElementById("duty");
	var cardNumTxt=document.getElementById("cardNum");
	var mobileTxt=document.getElementById("mobile");
	gender_f_Sel.style.display="";
	gender_s_Sel.style.display="none";
	vipTypeId_f_Sel.style.display="";
	vipTypeId_s_Sel.style.display="none";
    nameTxt.readOnly="";
	dutyTxt.readOnly="";
	cardNumTxt.readOnly="";
	mobileTxt.readOnly="";
}

function getFlightInfo(obj){
    var fromPortTxt=document.getElementById("fromPort");
	var toPortTxt=document.getElementById("toPort");
	var depaNameTxt=document.getElementById("fromPortName");
	var arrNameTxt=document.getElementById("toPortName");
	var flightInfoIdTxt=document.getElementById("flightInfoId");
	
	//for error
	var messageShowTrIdTd=document.getElementById("messageShowTrId");
	var warnSpanIdTd=document.getElementById("warnSpanId");
	var warnSpanFlightIdTd=document.getElementById("warnSpanFlightId");
	var messagesPresentTrIdTd=document.getElementById("messagesPresentTrId");
	
	//alert("coming!");
	var flightNumVal=document.getElementById("flightNum").value;
	var flightDateVal=document.getElementById("flightDate").value;
	var serviceId="<c:out value='${vipServiceSheetForm.id}'/>"
	if(flightDateVal!=""){
	  if(obj==""&&flightDateVal.length<10)return;
	  var re = flightDateVal.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);
	  if(re==null){
	  
	    // alert("wrong!");
	     if(messageShowTrIdTd!=null)
		    messageShowTrIdTd.style.display="";
		 if(warnSpanFlightIdTd!=null)
		    warnSpanFlightIdTd.style.display="";
		 if(messagesPresentTrIdTd!=null)
		    messagesPresentTrIdTd.style.display="none";
		    fromPortTxt.value="";
			toPortTxt.value="";
			depaNameTxt.value="";
			arrNameTxt.value="";
	      return;
	  }
	  //if(flightNumVal==""){
	    //alert("请输入航班号！");
	   // return;
	  // }
	  //alert("coming!"+re);
	}
	
	if(flightNumVal!=""&&flightDateVal!="")
	//alert("flightNumVal="+flightNumVal+";flightDateVal="+flightDateVal);
    FlightInfoDwr.getFlightInfo(flightNumVal,flightDateVal,setFlightInfo);
}

function setFlightInfo(flight){
	var fromPortTxt=document.getElementById("fromPort");
	var toPortTxt=document.getElementById("toPort");
	var depaNameTxt=document.getElementById("fromPortName");
	var arrNameTxt=document.getElementById("toPortName");
	var flightInfoIdTxt=document.getElementById("flightInfoId");
	
	//for error
	var messageShowTrIdTd=document.getElementById("messageShowTrId");
	var warnSpanIdTd=document.getElementById("warnSpanId");
	var warnSpanFlightIdTd=document.getElementById("warnSpanFlightId");
	var messagesPresentTrIdTd=document.getElementById("messagesPresentTrId");
	
	//alert("comeing!!");
	
	if(flight!=null){
	   
	   if(flight.depaName!=null&&flight.arrName!=null){
		   // alert("comeing_1!");
		    fromPortTxt.value=flight.departureAirport;
			toPortTxt.value=flight.arrivalAirport;
			depaNameTxt.value=flight.depaName;
			arrNameTxt.value=flight.arrName;
			flightInfoIdTxt.value=flight.id;
			if(messageShowTrIdTd!=null&&warnSpanIdTd.style.display=="none")
		    messageShowTrIdTd.style.display="none";
		    if(warnSpanFlightIdTd!=null)
		    warnSpanFlightIdTd.style.display="none";
		}
		//alert(document.getElementById("fromPort").value+"---"+document.getElementById("toPort").value);
	}else{
	    //alert("没有记录，请输入正确的航班号和日期！");
	    //alert("comeing_2!");
	    if(messageShowTrIdTd!=null)
	    messageShowTrIdTd.style.display="";
	    if(warnSpanFlightIdTd!=null)
	    warnSpanFlightIdTd.style.display="";
	    if(messagesPresentTrIdTd!=null)
	    messagesPresentTrIdTd.style.display="none";
	    fromPortTxt.value="";
		toPortTxt.value="";
		depaNameTxt.value="";
		arrNameTxt.value="";
	}
}

function getVipServiceInfo(){
	var idCardVal=document.getElementById("idCard").value;
	if(idCardVal!="")
	//alert("flightNumVal="+flightNumVal+";flightDateVal="+flightDateVal);
    VipServiceInfo.getVipServiceInfo(idCardVal,setVipServiceInfo);
}

function setVipServiceInfo(vipServiceSheet){
    var vipInfoIdxt=document.getElementById("vipInfoId");
	var nameTxt=document.getElementById("name");
	var idCardTxt=document.getElementById("idCard");
	var genderSel=document.getElementById("gender");
	var gender_f_Sel=document.getElementById("gender_f");
	var gender_s_Sel=document.getElementById("gender_s");
	var vipTypeId_f_Sel=document.getElementById("vipTypeId_f");
	var vipTypeId_s_Sel=document.getElementById("vipTypeId_s");
	var dutyTxt=document.getElementById("duty");
	var vipTypeIdSel=document.getElementById("vipTypeId");
	var vipTypeIdTxt=document.getElementById("vipTypeIdTxt");
	var cardNumTxt=document.getElementById("cardNum");
	var mobileTxt=document.getElementById("mobile");
	var bookTicketChex=document.getElementById("bookTicket");
	var provideFoodChex=document.getElementById("provideFood");
	var sentCarChex=document.getElementById("sentCar");
	var boardCheckChex=document.getElementById("boardCheck");
	var receivedManChex=document.getElementById("receivedMan");
	var visitantRoomChext=document.getElementById("visitantRoom");
	var cabinServiceChex=document.getElementById("cabinService");
	var receivedCarChext=document.getElementById("receivedCar");
	var otherChex=document.getElementById("other");
	var genderSpan=document.getElementById("genderSpan");
	var genderIn=document.getElementById("genderIn");
	var serviceDesireTxt=document.getElementById("serviceDesire");
	//for error
	var messageShowTrIdTd=document.getElementById("messageShowTrId");
	var warnSpanIdTd=document.getElementById("warnSpanId");
	var warnSpanFlightIdTd=document.getElementById("warnSpanFlightId");
	var messagesPresentTrIdTd=document.getElementById("messagesPresentTrId");
	
	   //initial
	    bookTicketChex.checked ="";
		provideFoodChex.checked="";
		sentCarChex.checked="";
		boardCheckChex.checked="";
		receivedManChex.checked="";
		visitantRoomChext.checked="";
		cabinServiceChex.checked="";
		receivedCarChext.checked="";
		otherChex.checked="";
	
	if(vipServiceSheet!=null){
	    
	    vipInfoIdxt.value=vipServiceSheet.vipInfoId;
	    nameTxt.value=vipServiceSheet.name;
	    nameTxt.readOnly="true";
	    //alert(nameTxt.readOnly);
	    if(vipServiceSheet.duty!=null){
	       dutyTxt.value=vipServiceSheet.duty;
		   dutyTxt.readOnly="true";
	    }else dutyTxt.value="";
		
		if(vipServiceSheet.cardNum!=null){
		  cardNumTxt.value=vipServiceSheet.cardNum;
		  cardNumTxt.readOnly="true";
		}else cardNumTxt.value="";
		
		if(vipServiceSheet.mobile!=null){
		  mobileTxt.value=vipServiceSheet.mobile;
		  mobileTxt.readOnly="true";
		}else mobileTxt.value="";
		
		if(vipServiceSheet.serviceDesire!=null){
		  serviceDesireTxt.value=vipServiceSheet.serviceDesire;
		  serviceDesireTxt.readOnly="true";
		}else serviceDesireTxt.value="";
		
		
		genderSel.value=vipServiceSheet.gender;
		if(vipServiceSheet.gender=="1")genderSpan.innerText="男";
		else genderSpan.innerText="女";//genderSpan
		genderIn.value=vipServiceSheet.gender;
		
		gender_f_Sel.style.display="none";
		gender_s_Sel.style.display="";
		vipTypeIdSel.value=vipServiceSheet.vipTypeId;
		vipTypeIdTxt.value=vipServiceSheet.vipTypeName;
		//vipTypeIdSel.disabled="true";
		vipTypeId_f_Sel.style.display="none";
		vipTypeId_s_Sel.style.display="";
		
		if(vipServiceSheet.bookTicket==1)
		bookTicketChex.checked ="true";
		if(vipServiceSheet.provideFood==1)
		provideFoodChex.checked="true";
		if(vipServiceSheet.sentCar==1)
		sentCarChex.checked="true";
		if(vipServiceSheet.boardCheck==1)
		boardCheckChex.checked="true";
		if(vipServiceSheet.receivedMan==1)
		receivedManChex.checked="true";
		if(vipServiceSheet.visitantRoom==1)
		visitantRoomChext.checked="true";
		if(vipServiceSheet.cabinService==1)
		cabinServiceChex.checked="true";
		if(vipServiceSheet.receivedCar==1)
		receivedCarChext.checked="true";
		if(vipServiceSheet.other==1)
		otherChex.checked="true";
		
		if(messageShowTrIdTd!=null&&warnSpanFlightIdTd.style.display=="none")
	    messageShowTrIdTd.style.display="none";
	    if(warnSpanIdTd!=null)
	    warnSpanIdTd.style.display="none";
		//alert(document.getElementById("fromPort").value+"---"+document.getElementById("toPort").value);
	}else{
	    //alert("没有记录，请输入正确的身份证号！或请手动输入资料。");
	    if(messageShowTrIdTd!=null)
	    messageShowTrIdTd.style.display="";
	    if(warnSpanIdTd!=null)
	    warnSpanIdTd.style.display="";
	    if(messagesPresentTrIdTd!=null)
	    messagesPresentTrIdTd.style.display="none";
	    //nameTxt.value="";
	    nameTxt.readOnly="";
		dutyTxt.value="";
		dutyTxt.readOnly="";
		cardNumTxt.value="";
		cardNumTxt.readOnly="";
		mobileTxt.value="";
		mobileTxt.readOnly="";
		serviceDesireTxt.value="";
		serviceDesireTxt.readOnly="";
		
		genderSel.value="";
		gender_f_Sel.style.display="";
		gender_s_Sel.style.display="none";
		vipTypeIdSel.value="";
		vipTypeIdTxt.value="";
		vipTypeId_f_Sel.style.display="";
		vipTypeId_s_Sel.style.display="none";
		
	}
}

function getVipTypeInfo(vipTypeId){
	//var vipTypeIdVal=document.getElementById("vipTypeId").value;
	if(vipTypeId!="")
	//alert("select value="+vipTypeId);
    VipServiceInfo.getVipTypeInfo(vipTypeId,setVipTypeInfo);
}
function setVipTypeInfo(vipType){
	var bookTicketChex=document.getElementById("bookTicket");
	var provideFoodChex=document.getElementById("provideFood");
	var sentCarChex=document.getElementById("sentCar");
	var boardCheckChex=document.getElementById("boardCheck");
	var receivedManChex=document.getElementById("receivedMan");
	var visitantRoomChext=document.getElementById("visitantRoom");
	var cabinServiceChex=document.getElementById("cabinService");
	var receivedCarChext=document.getElementById("receivedCar");
	var otherChex=document.getElementById("other");
	    //initial
	    bookTicketChex.checked ="";
		provideFoodChex.checked="";
		sentCarChex.checked="";
		boardCheckChex.checked="";
		receivedManChex.checked="";
		visitantRoomChext.checked="";
		cabinServiceChex.checked="";
		receivedCarChext.checked="";
		otherChex.checked="";
		
	if(null!=vipType){
	    //alert("vipType value="+vipType.name);
	    if(vipType.bookTicket==1)
		bookTicketChex.checked ="true";
		if(vipType.provideFood==1)
		provideFoodChex.checked="true";
		if(vipType.sentCar==1)
		sentCarChex.checked="true";
		if(vipType.boardCheck==1)
		boardCheckChex.checked="true";
		if(vipType.receivedMan==1)
		receivedManChex.checked="true";
		if(vipType.visitantRoom==1)
		visitantRoomChext.checked="true";
		if(vipType.cabinService==1)
		cabinServiceChex.checked="true";
		if(vipType.receivedCar==1)
		receivedCarChext.checked="true";
		if(vipType.other==1)
		otherChex.checked="true";
	}
}

</script>

